home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / CPlusPlus / SemtIntB.xh < prev    next >
Encoding:
Text File  |  1997-02-13  |  11.5 KB  |  435 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: SemtIntB.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODSemanticInterface_xh
  18. #define SOM_ODSemanticInterface_xh
  19.  
  20. class ODSemanticInterface;
  21.  
  22. #define ODSemanticInterface_MajorVersion 1
  23. #define ODSemanticInterface_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_ODExtension_xh
  31. #include <Extensn.xh>
  32. #endif
  33.  
  34. #ifndef ODSemanticInterface_API
  35. #define ODSemanticInterface_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of user-defined types:
  42.  */
  43. class SOMClass;
  44. class SOMObject;
  45. class ODFrame;
  46. class ODFacet;
  47. class ODObject;
  48. class ODExtension;
  49. class ODRefCntObject;
  50. class ODSemanticInterface;
  51. class ODSession;
  52. class ODPart;
  53. class ODDesc;
  54. class ODAppleEvent;
  55. class ODOSLToken;
  56.  
  57. /*
  58.  * End of user-defined types.
  59.  */
  60.  
  61. #ifdef OLDIBMSOMAPISUPPORT
  62. #define ODSemanticInterfaceCClassData ODSemanticInterfaceClassData
  63. #define ODSemanticInterfaceNewClass(major,minor) somNewVersionedClassReference(ODSemanticInterface,major,minor)
  64. #endif
  65.  
  66. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  67. #define ODSemanticInterfaceMetaClass SOMClass
  68.  
  69. #if PRAGMA_ALIGN_SUPPORTED
  70. #  pragma options align=power
  71. #endif
  72.  
  73. /* The API to the ODSemanticInterface class object, and the methods it introduces. */
  74. SOMEXTERN struct ODSemanticInterfaceClassDataStructure {
  75. #ifdef OLDIBMSOMAPISUPPORT
  76.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  77. #else
  78.     long zero;
  79. #endif
  80.     somStaticClassInfo *sci;
  81.     somDToken        instanceDataToken;
  82.     long reserved [3];
  83.     somMToken InitSemanticInterface;
  84.     somMToken CallEventHandler;
  85.     somMToken CallCoercionHandler;
  86.     somMToken CallObjectAccessor;
  87.     somMToken CallCompareProc;
  88.     somMToken CallCountProc;
  89.     somMToken CallDisposeTokenProc;
  90.     somMToken CallGetErrDescProc;
  91.     somMToken CallGetMarkTokenProc;
  92.     somMToken CallMarkProc;
  93.     somMToken CallAdjustMarksProc;
  94.     somMToken GetOSLSupportFlags;
  95.     somMToken SetOSLSupportFlags;
  96.     somMToken CallPredispatchProc;
  97.     somMToken UsingPredispatchProc;
  98. } SOMDLINK ODSemanticInterfaceClassData;
  99.  
  100. #if PRAGMA_ALIGN_SUPPORTED
  101. #  pragma options align=reset
  102. #endif
  103.  
  104. #if !defined(ODSemanticInterface_Class_Source) && !defined(SOM_Module_semtintb_Source)
  105. #if PRAGMA_IMPORT_SUPPORTED
  106. #pragma import list ODSemanticInterfaceClassData
  107. #endif
  108. #endif
  109.  
  110.  
  111. /*
  112.  * -- Typedefs and inline method declarations for left path inherited methods
  113.  * -- are omitted because this compilation had -museinheritedmethods in effect
  114.  */
  115.  
  116.  
  117. /*
  118.  * -- Typedefs for ODSemanticInterface Method Procedures
  119.  */
  120. SOMEXTERN {
  121. typedef void   (* SOMLINK somTD_ODSemanticInterface_InitSemanticInterface)(ODSemanticInterface *somSelf, Environment *ev,
  122.         ODPart* base,
  123.         ODSession* session);
  124. typedef void   (* SOMLINK somTD_ODSemanticInterface_CallEventHandler)(ODSemanticInterface *somSelf, Environment *ev,
  125.         ODPart* thePart,
  126.         ODAppleEvent* theODAppleEvent,
  127.         ODAppleEvent* reply);
  128. typedef void   (* SOMLINK somTD_ODSemanticInterface_CallCoercionHandler)(ODSemanticInterface *somSelf, Environment *ev,
  129.         ODPart* thePart,
  130.         ODDesc* theODDesc,
  131.         ODDescType toType,
  132.         ODDesc* theResult);
  133. typedef void   (* SOMLINK somTD_ODSemanticInterface_CallPredispatchProc)(ODSemanticInterface *somSelf, Environment *ev,
  134.         ODPart* thePart,
  135.         ODAppleEvent* theODAppleEvent,
  136.         ODAppleEvent* reply);
  137. typedef void   (* SOMLINK somTD_ODSemanticInterface_CallObjectAccessor)(ODSemanticInterface *somSelf, Environment *ev,
  138.         ODPart* thePart,
  139.         ODDescType desiredClass,
  140.         ODOSLToken* container,
  141.         ODDescType containerClass,
  142.         ODDescType form,
  143.         ODDesc* selectionData,
  144.         ODOSLToken* value);
  145. typedef void   (* SOMLINK somTD_ODSemanticInterface_CallCompareProc)(ODSemanticInterface *somSelf, Environment *ev,
  146.         ODPart* thePart,
  147.         ODDescType oper,
  148.         ODOSLToken* obj1,
  149.         ODOSLToken* obj2,
  150.         ODBoolean* result);
  151. typedef void   (* SOMLINK somTD_ODSemanticInterface_CallCountProc)(ODSemanticInterface *somSelf, Environment *ev,
  152.         ODPart* thePart,
  153.         ODDescType desiredType,
  154.         ODDescType containerClass,
  155.         ODOSLToken* container,
  156.         ODSLong* result);
  157. typedef void   (* SOMLINK somTD_ODSemanticInterface_CallDisposeTokenProc)(ODSemanticInterface *somSelf, Environment *ev,
  158.         ODPart* thePart,
  159.         ODOSLToken* unneededToken);
  160. typedef void   (* SOMLINK somTD_ODSemanticInterface_CallGetErrDescProc)(ODSemanticInterface *somSelf, Environment *ev,
  161.         ODPart* thePart,
  162.         ODDesc** errDesc);
  163. typedef void   (* SOMLINK somTD_ODSemanticInterface_CallGetMarkTokenProc)(ODSemanticInterface *somSelf, Environment *ev,
  164.         ODPart* thePart,
  165.         ODOSLToken* dContainerToken,
  166.         ODDescType containerClass,
  167.         ODOSLToken* result);
  168. typedef void   (* SOMLINK somTD_ODSemanticInterface_CallMarkProc)(ODSemanticInterface *somSelf, Environment *ev,
  169.         ODPart* thePart,
  170.         ODOSLToken* dToken,
  171.         ODOSLToken* markToken,
  172.         ODSLong index);
  173. typedef void   (* SOMLINK somTD_ODSemanticInterface_CallAdjustMarksProc)(ODSemanticInterface *somSelf, Environment *ev,
  174.         ODPart* thePart,
  175.         ODSLong newStart,
  176.         ODSLong newStop,
  177.         ODOSLToken* markToken);
  178. typedef ODSShort   (* SOMLINK somTD_ODSemanticInterface_GetOSLSupportFlags)(ODSemanticInterface *somSelf, Environment *ev);
  179. typedef void   (* SOMLINK somTD_ODSemanticInterface_SetOSLSupportFlags)(ODSemanticInterface *somSelf, Environment *ev,
  180.         ODSShort flags);
  181. typedef void   (* SOMLINK somTD_ODSemanticInterface_UsingPredispatchProc)(ODSemanticInterface *somSelf, Environment *ev,
  182.         ODBoolean usingNotUsing);
  183. }
  184.  
  185. #endif /* ODSemanticInterface_API */
  186.  
  187.  
  188. /*
  189.  * -- This emitter treats Method Tokens as Thunks by default.
  190.  * -- Use the sc modifier "nothunks" to change this default
  191.  */
  192. #undef somresolve_
  193. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  194.  
  195. /*
  196.  * -- The C++ Wrapper Class for ODSemanticInterface
  197.  */
  198. class ODSemanticInterface : public ODExtension
  199. {
  200. public:
  201.  
  202. // ODSemanticInterface::new registers use of the class object, and then uses somNew
  203. // to allocate memory and load the object method table pointer. 
  204. void *operator new(size_t size)
  205. {
  206.     SOM_IgnoreWarning(size);
  207.     // Allocate memory using the default allocator for ODSemanticInterface, and
  208.     // clear mem & set method table pointer, call basic initialization
  209. #ifdef SOMCHKNULL
  210.     void * __somResult = (void *)
  211.       somNewObject(ODSemanticInterface);
  212.     SOMCHKNULL(__somResult);
  213.     return __somResult;
  214. #else
  215.     return (void*) somNewObject(ODSemanticInterface);
  216. #endif
  217. }
  218.  
  219. // ODSemanticInterface::delete uses the default deallocator for the object's class.
  220. void operator delete(void * obj)
  221. {
  222.     if (obj) {
  223.         SOM_Resolve(obj,SOMObject,somFree)
  224.            ( (SOMObject*) obj );
  225.     }
  226. }
  227.  
  228. /* method: InitSemanticInterface */
  229. void   InitSemanticInterface(Environment *ev,
  230.         ODPart* base,
  231.         ODSession* session)
  232. {
  233.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,InitSemanticInterface)
  234.     (this,ev,base,session);
  235. #ifdef SOMCHKEXCEPT
  236.       SOMCHKEXCEPT;
  237. #endif
  238. }
  239.  
  240. /* method: CallEventHandler */
  241. void   CallEventHandler(Environment *ev,
  242.         ODPart* thePart,
  243.         ODAppleEvent* theODAppleEvent,
  244.         ODAppleEvent* reply)
  245. {
  246.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,CallEventHandler)
  247.     (this,ev,thePart,theODAppleEvent,reply);
  248. #ifdef SOMCHKEXCEPT
  249.       SOMCHKEXCEPT;
  250. #endif
  251. }
  252.  
  253. /* method: CallCoercionHandler */
  254. void   CallCoercionHandler(Environment *ev,
  255.         ODPart* thePart,
  256.         ODDesc* theODDesc,
  257.         ODDescType toType,
  258.         ODDesc* theResult)
  259. {
  260.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,CallCoercionHandler)
  261.     (this,ev,thePart,theODDesc,toType,theResult);
  262. #ifdef SOMCHKEXCEPT
  263.       SOMCHKEXCEPT;
  264. #endif
  265. }
  266.  
  267. /* method: CallPredispatchProc */
  268. void   CallPredispatchProc(Environment *ev,
  269.         ODPart* thePart,
  270.         ODAppleEvent* theODAppleEvent,
  271.         ODAppleEvent* reply)
  272. {
  273.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,CallPredispatchProc)
  274.     (this,ev,thePart,theODAppleEvent,reply);
  275. #ifdef SOMCHKEXCEPT
  276.       SOMCHKEXCEPT;
  277. #endif
  278. }
  279.  
  280. /* method: CallObjectAccessor */
  281. void   CallObjectAccessor(Environment *ev,
  282.         ODPart* thePart,
  283.         ODDescType desiredClass,
  284.         ODOSLToken* container,
  285.         ODDescType containerClass,
  286.         ODDescType form,
  287.         ODDesc* selectionData,
  288.         ODOSLToken* value)
  289. {
  290.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,CallObjectAccessor)
  291.     (this,ev,thePart,desiredClass,container,containerClass,form,selectionData,value);
  292. #ifdef SOMCHKEXCEPT
  293.       SOMCHKEXCEPT;
  294. #endif
  295. }
  296.  
  297. /* method: CallCompareProc */
  298. void   CallCompareProc(Environment *ev,
  299.         ODPart* thePart,
  300.         ODDescType oper,
  301.         ODOSLToken* obj1,
  302.         ODOSLToken* obj2,
  303.         ODBoolean* result)
  304. {
  305.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,CallCompareProc)
  306.     (this,ev,thePart,oper,obj1,obj2,result);
  307. #ifdef SOMCHKEXCEPT
  308.       SOMCHKEXCEPT;
  309. #endif
  310. }
  311.  
  312. /* method: CallCountProc */
  313. void   CallCountProc(Environment *ev,
  314.         ODPart* thePart,
  315.         ODDescType desiredType,
  316.         ODDescType containerClass,
  317.         ODOSLToken* container,
  318.         ODSLong* result)
  319. {
  320.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,CallCountProc)
  321.     (this,ev,thePart,desiredType,containerClass,container,result);
  322. #ifdef SOMCHKEXCEPT
  323.       SOMCHKEXCEPT;
  324. #endif
  325. }
  326.  
  327. /* method: CallDisposeTokenProc */
  328. void   CallDisposeTokenProc(Environment *ev,
  329.         ODPart* thePart,
  330.         ODOSLToken* unneededToken)
  331. {
  332.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,CallDisposeTokenProc)
  333.     (this,ev,thePart,unneededToken);
  334. #ifdef SOMCHKEXCEPT
  335.       SOMCHKEXCEPT;
  336. #endif
  337. }
  338.  
  339. /* method: CallGetErrDescProc */
  340. void   CallGetErrDescProc(Environment *ev,
  341.         ODPart* thePart,
  342.         ODDesc** errDesc)
  343. {
  344.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,CallGetErrDescProc)
  345.     (this,ev,thePart,errDesc);
  346. #ifdef SOMCHKEXCEPT
  347.       SOMCHKEXCEPT;
  348. #endif
  349. }
  350.  
  351. /* method: CallGetMarkTokenProc */
  352. void   CallGetMarkTokenProc(Environment *ev,
  353.         ODPart* thePart,
  354.         ODOSLToken* dContainerToken,
  355.         ODDescType containerClass,
  356.         ODOSLToken* result)
  357. {
  358.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,CallGetMarkTokenProc)
  359.     (this,ev,thePart,dContainerToken,containerClass,result);
  360. #ifdef SOMCHKEXCEPT
  361.       SOMCHKEXCEPT;
  362. #endif
  363. }
  364.  
  365. /* method: CallMarkProc */
  366. void   CallMarkProc(Environment *ev,
  367.         ODPart* thePart,
  368.         ODOSLToken* dToken,
  369.         ODOSLToken* markToken,
  370.         ODSLong index)
  371. {
  372.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,CallMarkProc)
  373.     (this,ev,thePart,dToken,markToken,index);
  374. #ifdef SOMCHKEXCEPT
  375.       SOMCHKEXCEPT;
  376. #endif
  377. }
  378.  
  379. /* method: CallAdjustMarksProc */
  380. void   CallAdjustMarksProc(Environment *ev,
  381.         ODPart* thePart,
  382.         ODSLong newStart,
  383.         ODSLong newStop,
  384.         ODOSLToken* markToken)
  385. {
  386.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,CallAdjustMarksProc)
  387.     (this,ev,thePart,newStart,newStop,markToken);
  388. #ifdef SOMCHKEXCEPT
  389.       SOMCHKEXCEPT;
  390. #endif
  391. }
  392.  
  393. /* method: GetOSLSupportFlags */
  394. ODSShort   GetOSLSupportFlags(Environment *ev)
  395. {
  396.    #ifdef SOMCHKEXCEPT
  397.    ODSShort __somResult = 
  398.       SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,GetOSLSupportFlags)
  399.     (this,ev);
  400.       SOMCHKEXCEPT;
  401.    return __somResult;
  402. #else
  403.    return SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,GetOSLSupportFlags)
  404.     (this,ev);
  405. #endif
  406. }
  407.  
  408. /* method: SetOSLSupportFlags */
  409. void   SetOSLSupportFlags(Environment *ev,
  410.         ODSShort flags)
  411. {
  412.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,SetOSLSupportFlags)
  413.     (this,ev,flags);
  414. #ifdef SOMCHKEXCEPT
  415.       SOMCHKEXCEPT;
  416. #endif
  417. }
  418.  
  419. /* method: UsingPredispatchProc */
  420. void   UsingPredispatchProc(Environment *ev,
  421.         ODBoolean usingNotUsing)
  422. {
  423.    SOM_ResolveD(this,ODSemanticInterface,ODSemanticInterface,UsingPredispatchProc)
  424.     (this,ev,usingNotUsing);
  425. #ifdef SOMCHKEXCEPT
  426.       SOMCHKEXCEPT;
  427. #endif
  428. }
  429.  
  430. };   /* ODSemanticInterface */
  431.  
  432.  
  433.  
  434. #endif       /* SOM_ODSemanticInterface_xh */
  435.